#ifndef AMFWRITER_H
#define AMFWRITER_H

#include "AMFMessage.h"
#include "AMFBody.h"
#include "wxAMF.h"

#include <vector>
#include <wx/stream.h>

namespace AMF {

class AMFWriter
{
    public:
        virtual ~AMFWriter();
        AMFWriter(wxOutputStream *output);
        void WriteAMFMessage(AMFMessage *msg);
    protected:
    private:
        void WriteAMFBody(const AMFBody *value);
        void WriteAMFData(const AMFObject *value);
        void WriteAMFArray(const vector<AMFObject*> *value);
        void WriteAMF3Data(const AMFObject *value);
        void WriteAMF3Object(Hashtable *value);
        void WriteAMFString(const wxString *value);
        void WriteAMFUntypeString(const wxString *value);
        void WriteAMFInt16(const wxInt16 *value);
        void WriteAMFInt32(const wxInt32 *value);
        void WriteAMF3String(const wxString *value);
        void WriteAMF3IntegerData(const int *value);
        wxOutputStream *_output;
};

} // namespace AMF

#endif // AMFWRITER_H
